From 2fd517af437782e71f4295dc7c2bde3a8d266957 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 4 Apr 2008 05:08:25 +0000 Subject: [PATCH] * Don't show hist link if hidden * Mark more functions --- includes/ChangesList.php | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 83271f49ed..e74eba28c9 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -306,7 +306,7 @@ class OldChangesList extends ChangesList { /** * Format a line using the old system (aka without any javascript). */ - function recentChangesLine( &$rc, $watched = false ) { + public function recentChangesLine( &$rc, $watched = false ) { global $wgContLang, $wgRCShowChangedSize; $fname = 'ChangesList::recentChangesLineOld'; @@ -389,7 +389,7 @@ class EnhancedChangesList extends ChangesList { /** * Format a line for enhanced recentchange (aka with javascript and block of lines). */ - function recentChangesLine( &$baseRC, $watched = false ) { + public function recentChangesLine( &$baseRC, $watched = false ) { global $wgLang, $wgContLang; # Create a specialised object @@ -520,7 +520,7 @@ class EnhancedChangesList extends ChangesList { /** * Enhanced RC group */ - function recentChangesBlockGroup( $block ) { + private function recentChangesBlockGroup( $block ) { global $wgLang, $wgContLang, $wgRCShowChangedSize; $r = ''; @@ -650,10 +650,13 @@ class EnhancedChangesList extends ChangesList { } # History - $r .= '(' . $this->skin->makeKnownLinkObj( $block[0]->getTitle(), - $this->message['history'], $curIdEq.'&action=history' ); - $r .= ')'; - + if( $namehidden ) { + $r .= '(' . $this->message['history'] . ')'; + } else { + $r .= '(' . $this->skin->makeKnownLinkObj( $block[0]->getTitle(), + $this->message['history'], $curIdEq.'&action=history' ) . ')'; + } + $r .= $users; $r .=$this->numberofWatchingusers($block[0]->numberofWatchingusers); @@ -725,7 +728,7 @@ class EnhancedChangesList extends ChangesList { return $r; } - function maybeWatchedLink( $link, $watched=false ) { + private function maybeWatchedLink( $link, $watched=false ) { if( $watched ) { // FIXME: css style might be more appropriate return '' . $link . ''; @@ -741,7 +744,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag * @access private */ - function arrow( $dir, $alt='' ) { + private function arrow( $dir, $alt='' ) { global $wgStylePath; $encUrl = htmlspecialchars( $wgStylePath . '/common/images/Arr_' . $dir . '.png' ); $encAlt = htmlspecialchars( $alt ); @@ -754,7 +757,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag * @access private */ - function sideArrow() { + private function sideArrow() { global $wgContLang; $dir = $wgContLang->isRTL() ? 'l' : 'r'; return $this->arrow( $dir, '+' ); @@ -766,7 +769,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag * @access private */ - function downArrow() { + private function downArrow() { return $this->arrow( 'd', '-' ); } @@ -775,7 +778,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag * @access private */ - function spacerArrow() { + private function spacerArrow() { return $this->arrow( '', ' ' ); } @@ -784,7 +787,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML
tag * @access private */ - function spacerIndent() { + private function spacerIndent() { return '     '; } @@ -792,7 +795,7 @@ class EnhancedChangesList extends ChangesList { * Enhanced RC ungrouped line. * @return string a HTML formated line (generated using $r) */ - function recentChangesBlockLine( $rcObj ) { + private function recentChangesBlockLine( $rcObj ) { global $wgContLang, $wgRCShowChangedSize; # Get rc_xxxx variables @@ -868,7 +871,7 @@ class EnhancedChangesList extends ChangesList { * If enhanced RC is in use, this function takes the previously cached * RC lines, arranges them, and outputs the HTML */ - function recentChangesBlock() { + private function recentChangesBlock() { if( count ( $this->rc_cache ) == 0 ) { return ''; } @@ -888,7 +891,7 @@ class EnhancedChangesList extends ChangesList { * Returns text for the end of RC * If enhanced RC is in use, returns pretty much all the text */ - function endRecentChangesList() { + public function endRecentChangesList() { return $this->recentChangesBlock() . parent::endRecentChangesList(); } -- 2.20.1